<template>
  <view class="nav-bar">
    <view class="nav-bar__left" @click="onLeftClick">
      <slot name="left"></slot>
    </view>
    <view class="nav-bar__right" @click="onRightClick">
      <slot name="right"></slot>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: ''
    }
  },
  methods: {
    onLeftClick() {
      this.$emit('leftClick');
    },
    onRightClick() {
      this.$emit('rightClick');
    }
  }
};
</script>

<style scoped>
	.nav-bar {
	  display: flex;
	  justify-content: space-between;
	  align-items: center;
	  height: 44px;
	  padding: 0 15px;
	  background-color: #ffffff;
	  border-bottom: 1px solid #e8e8e8;
	}
	
	.nav-bar__left,
	.nav-bar__right {
	  display: flex;
	  align-items: center;
	  height: 100%;
	}
	
	.nav-bar__title {
	  font-size: 18px;
	  font-weight: bold;
	  color: #333333;
	}

</style>
